﻿<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" xmlns:fb="http://www.facebook.com/2008/fbml">
  <Control
    Id="AdditionalPageHead"
    Sequence="1000"
    ControlSrc="~/_controltemplates/Happenings/Facebook/FacebookBeginScript.ascx">
  </Control>
  <Control
    Id="AdditionalPageFoot"
    Sequence="1000"
    ControlSrc="~/_controltemplates/Happenings/Facebook/FacebookEndScript.ascx">
  </Control>
  <Module Name="WebParts" List="113" Url="_catalogs/wp">
    <File Url="CommentsPart.webpart" Type="GhostableInLibrary" />
    <File Url="LoginPart.webpart" Type="GhostableInLibrary" />
    <File Url="StatusPart.webpart" Type="GhostableInLibrary" />
    <File Url="SharePart.webpart" Type="GhostableInLibrary" />
    <File Url="ProfilePicturePart.webpart" Type="GhostableInLibrary" />
  </Module>
  <CustomAction
		  Id="WorkflowSettingsDefaults"
		  GroupId="SiteCollectionAdmin"
		  Location="Microsoft.SharePoint.SiteSettings"
		  Sequence="10"
		  Title="Facebook Connect Settings">
    <UrlAction Url="_layouts/Happenings/Facebook/facebooksettings.aspx" />
  </CustomAction>

  <!-- Place the FKS Share Site option on the Site Actions Menu for every Site in the Site Collection -->
  <CustomAction
    Description="Share this site with your freinds on facebook."
    GroupId="SiteActions"
    Id="FKS.SiteActions"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="2001"
    ImageUrl="/_layouts/images/happenings/fb.jpg"
    Title="Share!"
  >
    <UrlAction Url="javascript:FB.Connect.showShareDialog('{SiteUrl}', function() {});"/>
  </CustomAction>

  <!-- list item ECB -->
  <CustomAction
    Description="Share this List Item with your freinds on facebook."
    Id="FKS.Item"
    ImageUrl="/_layouts/images/happenings/fb.jpg"
    Location="EditControlBlock"
    RegistrationId="0x"
    RegistrationType="ContentType"
    Title="Share!"
    >
    <UrlAction Url="~site/_layouts/happenings/facebook/shareDocument.aspx?List={ListId}&amp;ID={ItemId}"/>
  </CustomAction>

  <!-- Actions menu on lists -->
  <CustomAction
    Description="Share this List with your freinds on facebook."
    Id="FKS.List"
    ImageUrl="/_layouts/images/happenings/fb.jpg"
    GroupId="ActionsMenu"
    Location="Microsoft.SharePoint.StandardMenu"
    RegistrationType="List"
    Title="Share!"
    >
    <UrlAction Url="javascript:var url=window.location;FB.Connect.showShareDialog(url, function() {});"/>
  </CustomAction>

  <!-- View menu for every List -->
  <CustomAction
    Description="Share this List with your freinds on facebook."
    Id="FKS.ItemDisplay"
    ControlSrc="/_controltemplates/Happenings/Facebook/ShareMenu.ascx"
    ImageUrl="/_layouts/images/happenings/fb.jpg"
    Location="DisplayFormToolbar"
    RegistrationId="0x"
    RegistrationType="ContentType"
    Title="Share!"
    >
  </CustomAction>
</Elements>